From 1974ebc7dd4c7d703b86b99e6210cb0f9b8ba367 Mon Sep 17 00:00:00 2001 From: Alastair Tse Date: Fri, 3 Nov 2006 10:41:20 +0000 Subject: [PATCH] [XEND] Handle permission denied when calling xc.domain_getinfo Signed-off-by: Alastair Tse --- tools/python/xen/xend/XendDomain.py | 6 +++++- tools/xm-test/ramdisk/skel/etc/init.d/rcS | 0 2 files changed, 5 insertions(+), 1 deletion(-) mode change 100644 => 100755 tools/xm-test/ramdisk/skel/etc/init.d/rcS diff --git a/tools/python/xen/xend/XendDomain.py b/tools/python/xen/xend/XendDomain.py index 34f5ab0558..2015ca7c4b 100644 --- a/tools/python/xen/xend/XendDomain.py +++ b/tools/python/xen/xend/XendDomain.py @@ -328,7 +328,11 @@ class XendDomain: @rtype: list of dicts @return: A list of dicts representing the running domains. """ - return xc.domain_getinfo() + try: + return xc.domain_getinfo() + except RuntimeError, e: + log.exception("Unable to get domain information.") + return {} def _setDom0CPUCount(self): """Sets the number of VCPUs dom0 has. Retreived from the diff --git a/tools/xm-test/ramdisk/skel/etc/init.d/rcS b/tools/xm-test/ramdisk/skel/etc/init.d/rcS old mode 100644 new mode 100755 -- 2.30.2